<?php $this->pageTitle=Yii::app()->name . ' - '.UserModule::t("Registration");
$this->breadcrumbs=array(
	UserModule::t("Registration"),
);
?>

<p class="page_titre_registration"><?php echo UserModule::t("Registration"); ?></p>

<?php if(Yii::app()->user->hasFlash('registration')): ?>
<div class="success">
<?php echo Yii::app()->user->getFlash('registration'); ?>
</div>
<?php else: ?>

<div class="form">
<?php $form=$this->beginWidget('UActiveForm', array(
	'id'=>'registration-form',
	'enableAjaxValidation'=>true,
	'disableAjaxValidationAttributes'=>array('RegistrationForm_verifyCode'),
	'htmlOptions' => array('enctype'=>'multipart/form-data'),
)); ?>

	<?php echo $form->errorSummary(array($model,$profile)); ?>
	
	<table class="table_form_registration">
		<tr>
			<td class="libelle_form_registration"><?php echo $form->labelEx($model,'username'); ?></td>
			<td class="separateur">:</td>
			<td class="champ_form_registration"><?php echo $form->textField($model,'username'); ?></td>
			<td class="erreur_form_registration" id="erreurUserNameFormRegistration"><?php echo $form->error($model,'username'); ?></td>
		</tr>
		<tr>
			<td class="libelle_form_registration"><?php echo $form->labelEx($model,'password'); ?></td>
			<td class="separateur">:</td>
			<td class="champ_form_registration"><?php echo $form->passwordField($model,'password'); ?></td>
			<td class="erreur_form_registration" id="erreurPasswordFormRegistration"><?php echo $form->error($model,'password'); ?></td>
		</tr>
		<tr>
			<td colspan=4><span class="hint"><?php echo UserModule::t("Minimal password length 4 symbols."); ?></span></td>
		</tr>
		<tr>
			<td class="libelle_form_registration"><?php echo $form->labelEx($model,'verifyPassword'); ?></td>
			<td class="separateur">:</td>
			<td class="champ_form_registration"><?php echo $form->passwordField($model,'verifyPassword'); ?></td>
			<td class="erreur_form_registration" id="erreurVerifPasswordFormRegistration"><?php echo $form->error($model,'verifyPassword'); ?></td>
		</tr>
		<tr>
			<td class="libelle_form_registration"><?php echo $form->labelEx($model,'email'); ?></td>
			<td class="separateur">:</td>
			<td class="champ_form_registration"><?php echo $form->textField($model,'email'); ?></td>
			<td class="erreur_form_registration" id="erreurMailFormRegistration"><?php echo $form->error($model,'email'); ?></td>
		</tr>
		<tr>
			<td class="libelle_form_registration"><?php echo $form->labelEx($model,'urlImage'); ?></td>
			<td class="separateur">:</td>
			<td class="champ_form_registration"><?php echo $form->FileField($model,'urlImage',array('size'=>30,'maxlength'=>300)); ?></td>
			<td class="erreur_form_registration" id="erreurUrlImageFormProduit"><?php echo $form->error($model,'urlImage'); ?></td>
		</tr>
		<tr>
			<td colspan=4>
				<?php if (UserModule::doCaptcha('registration')): ?>
		
				<?php echo $form->labelEx($model,'verifyCode'); ?>
				
				<?php $this->widget('CCaptcha'); ?>
				<?php echo $form->textField($model,'verifyCode'); ?>
				<?php echo $form->error($model,'verifyCode'); ?>
			</td>
		</tr>
		<tr>
			<td class="hint" colspan=4><?php echo UserModule::t("Please enter the letters as they are shown in the image above."); ?>
			<?php echo UserModule::t("Letters are not case-sensitive."); ?></td>
		</tr>
		<?php endif; ?>
		
		<tr>
			<td class="bouton_form_registration" colspan=4>
				<?php echo CHtml::submitButton(UserModule::t("Register")); ?>
			</td>
		</tr>
	</table>

<?php $this->endWidget(); ?>
</div><!-- form -->
<?php endif; ?>